Component({
  properties: {
    treeData: {
      type: Array,
      value: []
    }
  },
  data: {
    selectedId: null
  },
  methods: {
    selectItem(e) {
      console.log(e);
      const id = e.currentTarget.dataset.id;
      this.setData({
        selectedId: id
      });
      this.triggerEvent('select', { id: id });
    }
  }
});